package com.siam.package_promotion.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.siam.package_promotion.entity.DeductionMemberRelation;

/**
 * ---------------------------
 * 抵扣劵用户关联表 (DeductionMemberRelationService)         
 * ---------------------------
 * 作者：  暹罗
 * 时间：  2025-02-25 15:21:52
 * ---------------------------
 */
public interface DeductionMemberRelationService {
	
	void insertSelective(DeductionMemberRelation memberRelation);
	
	int countByOrderId(Integer orderId);
	
	Page<DeductionMemberRelation> getListByPage(Page<DeductionMemberRelation> page,DeductionMemberRelation deductionMemberRelation);
	
	Integer getCountsByMemberId(Integer memberId,Integer isUsed);
	
	/**
	 * 查询没有使用
	 * @param deductionMemberRelationId
	 * @return
	 */
	DeductionMemberRelation selectNotUsedByDeductionMemberRelationId(Integer deductionMemberRelationId);
	
	void updateDeductionUsed(Integer id, Boolean isUsed);
}
